<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
	  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:fragment="head">
	<base th:href="@{/}">
	<meta charset="utf-8">
	<title></title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="static/layui/css/layui.css" media="all" />
	<script type="text/javascript" src="static/plugin/jquery/jquery-1.4.4.min.js"></script>
	<script type="text/javascript" src="static/layui/layui.js"></script>
</head>
<body class="layui-fluid" th:fragment="body">
<div class="layui-row" style="margin-left: 10px;">
	<div id="findMsg" ></div>
</div>
<div id="custom"></div>
<div class="layui-row" style="margin-top: 5px;">
	<div class="layui-col-md12">
		<table id="table" class="layui-table" lay-filter="table"></table>
	</div>
</div>
<div id="querySelect"></div>
</body>
<div class="layui-form-item" style="display: none">
	<div class="layui-inline">
		<div class="layui-upload-drag" id="uploadExcel">
			<i class="layui-icon"></i>
			<p>点击上传，或将文件拖拽到此处</p>
		</div>
	</div>
</div>
<script type="text/javascript" th:inline="javascript">
	var object = [[${obj}]]
	var querySelectlist = [[${querySelectlist}]];
	layui.use(['form'],function() {
		var form = layui.form;
		$("#querySelect").html();
		for(let obj in querySelectlist){
			var html = '';
			html = html+"<script type='text/html' id='"+obj+"'>"
					+"<select lay-search>"
					+"<option value=''>请搜索或选择</option>";
			for(var i in querySelectlist[obj]){
				html = html+"<option value='"+querySelectlist[obj][i].label+"'>"+querySelectlist[obj][i].value+"</option>";
			}
			html = html+"<\/select><\/script>";
			$("#querySelect").append(html);
		}
		form.render();
	})
</script>
<script type="text/javascript" src="static/js/inventory/index.js"></script>
<script type="text/html" id="tableToolbar" th:inline="javascript">
	<div class="layui-inline" shiro:hasPermission="${'btn:'+obj.url+'_add'}">
		<button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon">&#xe654;</i>新增</button>
	</div>
	<div class="layui-inline" shiro:hasPermission="${'btn:'+obj.url+'_del'}">
		<button class="layui-btn layui-btn-sm layui-bg-red" lay-event="delete"><i class="layui-icon">&#xe642;</i>删除</button>
	</div>
	<div class="layui-inline" shiro:hasPermission="${'btn:'+obj.url+'_import'}">
		<button class="layui-btn layui-btn-sm" lay-event="import"><i class="layui-icon">&#xe654;</i>导入</button>
	</div>
	<div class="layui-inline" shiro:hasPermission="${'btn:'+obj.url+'_download'}">
		<button class="layui-btn layui-btn-sm" lay-event="download"><i class="layui-icon">&#xe601;</i>导出数据</button>
	</div>
	<button type="button" lay-event="find" class="layui-btn layui-btn-primary layui-btn-sm"><i class="layui-icon">&#xe615;</i>查询</button>
</script>
<script type="text/html" id="LAY-excel-export-ans">
	{{# layui.each(d.data, function(file_index, item){ }}
	<blockquote class="layui-elem-quote">{{d.files[file_index].name}}</blockquote>
	<div class="layui-tab" lay-filter="sheet">
		<ul class="layui-tab-title">
			{{# layui.each(item, function(sheet_name, content) { }}
			<li lay-id="{{sheet_name}}">{{sheet_name}}</li>
			{{# }); }}
		</ul>
		<div class="layui-tab-content">
			{{# layui.each(item, function(sheet_name, content) { }}
			<div class="layui-tab-item">
				<table class="layui-table">
					{{# layui.each(content, function(row_index, value) { }}
					{{# var col_index = 0 }}
					<tr>
						{{# layui.each(value, function(col_key, val) { }}
						<td id="table-export-{{file_index}}-{{sheet_name}}-{{row_index}}-{{col_index++}}">{{val}}</td>
						{{# });}}
					</tr>
					{{# });}}
				</table>
			</div>
			{{# }); }}
		</div>
	</div>
	{{# }) }}
</script>
</html>